export  default function Child (pros:any){
    const childMessage = '这是子组件的数据'
    const sendData = ()=>{
        pros.onData(childMessage)
    }
    return (
        <>
            <div className="main">
                <h1>这里是子组件</h1>
                <h2>{pros.message}</h2>
                <button onClick={sendData}>点击传入组件</button>
            </div>
        </>
    )
}